import { type MockMethod } from "vite-plugin-mock"
import {MOCK_BASE_URL} from "@/config";

const BASEURL:string = '/mock/user'
const std:MockMethod[] = [
    {
        url:'/mock/user/login',
        method:'post',
        response:():IResult<any> => {
            return {
                status: 200,
                message: '',
                data: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0aW1lU3RhbXAiOiJNb24gSnVsIDE1IDIyOjAyOjIwIENTVCAyMDI0IiwidXNlck5hbWUiOiJsd3ciLCJleHAiOjE3MjExMzg1NDB9.ZXER6wARyJIs7p0V7nORUH_ZZDAku7H0AIJ3CJKhlGU',
                errorMsg: true,
                timestamp: new Date()
            }

        },
    },
    {
        url:'/mock/user/info',
        method:'post',
        response:():IResult<any> => {
            return {
                status: 200,
                message: '',
                data: {
                    id: 1,
                    username: "user9956",
                    password: "482c811da5d5b4bc6d497ffa98491e38",
                    role: 2,
                    state: 0,
                    cover: "https://picsum.photos/200/300",
                    age: 28,
                    sex: 1,
                    email: "8162909@qq.com",
                    phone: "+17715571257",
                    is_delete: 0,
                    create_time: "2024-06-21T15:26:52.054909Z",
                    update_time: "2024-06-21T15:26:52.054909Z"
                },
                errorMsg: true,
                timestamp: new Date()
            }

        },
    },
    {
        url:'/mock/blog/searchBlog',
        method: "post",
        response(opt):IResult<any> {
            console.log(opt)
            return {
                status: 200,
                message:'搜索成功',
                data: [
                    {
                        "id": 1,
                        "uuid": "1",
                        "type": "java",
                        "cover": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/java.png",
                        "title": "<p>\u8fd9\u662f\u7b2c\u4e8c\u4e2a\u793a\u4f8b\u6bb5\u843d\uff0c\u5305\u542b\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002</p>",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "content": "<p>\u8fd9\u662f\u7b2c\u4e8c\u4e2a\u793a\u4f8b\u6bb5\u843d\uff0c\u5305\u542b\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002</p>",
                        "state": {
                            "overt": false,
                            "reviewed": false,
                            "collect_nub": 266,
                            "like_nub": 643,
                            "views": 501,
                            "comments_nub": 151,
                            "is_delete": true
                        },
                        "time": {
                            "create_time": "2024-06-21T16:14:38.587390Z",
                            "update_time": "2024-06-21T16:14:38.587390Z"
                        }
                    },
                    {
                        "id": 2,
                        "uuid": "12",
                        "type": "Vue",
                        "cover": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/vue.png",
                        "title": "<p>\u8fd9\u662f\u7b2c\u4e8c\u4e2a\u793a\u4f8b\u6bb5\u843d\uff0c\u5305\u542b\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002</p>",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "content": "<p>\u8fd9\u662f\u7b2c\u4e8c\u4e2a\u793a\u4f8b\u6bb5\u843d\uff0c\u5305\u542b\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002</p>",
                        "state": {
                            "overt": false,
                            "reviewed": false,
                            "collect_nub": 373,
                            "like_nub": 770,
                            "views": 17,
                            "comments_nub": 203,
                            "is_delete": true
                        },
                        "time": {
                            "create_time": "2024-06-21T16:14:38.587390Z",
                            "update_time": "2024-06-21T16:14:38.587390Z"
                        }
                    },
                    {
                        "id": 3,
                        "uuid": "3",
                        "type": "python",
                        "cover": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/python.png",
                        "title": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "state": {
                            "overt": true,
                            "reviewed": false,
                            "collect_nub": 620,
                            "like_nub": 435,
                            "views": 799,
                            "comments_nub": 269,
                            "is_delete": false
                        },
                        "time": {
                            "create_time": "2024-06-21T16:14:38.587390Z",
                            "update_time": "2024-06-21T16:14:38.587390Z"
                        }
                    },
                    {
                        "id": 4,
                        "uuid": "7",
                        "type": "C",
                        "cover": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/c.png",
                        "title": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "state": {
                            "overt": false,
                            "reviewed": false,
                            "collect_nub": 992,
                            "like_nub": 856,
                            "views": 461,
                            "comments_nub": 617,
                            "is_delete": false
                        },
                        "time": {
                            "create_time": "2024-06-21T16:14:38.587390Z",
                            "update_time": "2024-06-21T16:14:38.587390Z"
                        }
                    },
                    {
                        "id": 5,
                        "uuid": "5",
                        "type": "C++",
                        "cover": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/c++.png",
                        "title": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "state": {
                            "overt": false,
                            "reviewed": false,
                            "collect_nub": 727,
                            "like_nub": 288,
                            "views": 749,
                            "comments_nub": 428,
                            "is_delete": true
                        },
                        "time": {
                            "create_time": "2024-06-21T16:14:38.587390Z",
                            "update_time": "2024-06-21T16:14:38.587390Z"
                        }
                    }
                ],
                errorMsg: true,
                timestamp: new Date()
            }
        },
    },
    {
        url:'/mock/model/searchModel',
        method: "post",
        response():IResult<any> {
            return {
                status: 200,
                message:'搜索成功',
                data: [
                    {
                        "id": 1,
                        "model_name": "gpt-3.5-turbo",
                        "model_type": "search",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>"
                    },
                    {
                        "id": 2,
                        "model_name": "gpt-4-o",
                        "model_type": "video",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>"
                    },
                    {
                        "id": 3,
                        "model_name": "gpt-4",
                        "model_type": "audio",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>"
                    },
                    {
                        "id": 4,
                        "model_name": "gpt-4-turbo",
                        "model_type": "search_search",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>"
                    },
                    {
                        "id": 5,
                        "model_name": "gpt-4-32k",
                        "model_type": "video_search",
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>"
                    }
                ],
                errorMsg: true,
                timestamp: new Date()
            }
        },
    },
    {
        url:'/mock/course/searchCourse',
        method: "post",
        timeout: 6,
        response():IResult<any> {
            return {
                status: 200,
                message:'搜索成功',
                data: [
                    {
                        "id": 1,
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "class_title": "java",
                        "class_type": "java",
                        "class_node": 1,
                        "class_image": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/java.png",
                        "class_content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "class_source": 0,
                        "class_author": "\u5f20\u4e09",
                        "state": {
                            "overt": true,
                            "views": 540,
                            "likes": 263,
                            "comment": 384,
                            "is_delete": 0
                        },
                        "time": {
                            "create_time": "2024-06-21T15:49:09.923651Z",
                            "update_time": "2024-06-21T15:49:09.923651Z"
                        }
                    },
                    {
                        "id": 2,
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "class_title": "python",
                        "class_type": "python",
                        "class_node": 2,
                        "class_image": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/python.png",
                        "class_content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "class_source": 0,
                        "class_author": "\u5f20\u4e09",
                        "state": {
                            "overt": false,
                            "views": 623,
                            "likes": 701,
                            "comment": 157,
                            "is_delete": 0
                        },
                        "time": {
                            "create_time": "2024-06-21T15:49:09.923651Z",
                            "update_time": "2024-06-21T15:49:09.923651Z"
                        }
                    },
                    {
                        "id": 3,
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "class_title": "php",
                        "class_type": "php",
                        "class_node": 3,
                        "class_image": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/php.png",
                        "class_content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "class_source": 0,
                        "class_author": "\u5f20\u4e09",
                        "state": {
                            "overt": false,
                            "views": 132,
                            "likes": 438,
                            "comment": 4,
                            "is_delete": 0
                        },
                        "time": {
                            "create_time": "2024-06-21T15:49:09.923651Z",
                            "update_time": "2024-06-21T15:49:09.923651Z"
                        }
                    },
                    {
                        "id": 4,
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "class_title": "C",
                        "class_type": "C",
                        "class_node": 1,
                        "class_image": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/c.png",
                        "class_content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "class_source": 0,
                        "class_author": "\u5f20\u4e09",
                        "state": {
                            "overt": true,
                            "views": 675,
                            "likes": 255,
                            "comment": 566,
                            "is_delete": 0
                        },
                        "time": {
                            "create_time": "2024-06-21T15:49:09.923651Z",
                            "update_time": "2024-06-21T15:49:09.923651Z"
                        }
                    },
                    {
                        "id": 5,
                        "rubric": "<p>\u8fd9\u662f\u7b2c\u4e00\u4e2a\u793a\u4f8b\u6bb5\u843d\u3002</p>",
                        "class_title": "C++",
                        "class_type": "C++",
                        "class_node": 2,
                        "class_image": "http://qiniuyun.linter.top/Linter/Vue_img/Home/Class/c++.png",
                        "class_content": "<p>\u793a\u4f8b\u5185\u5bb9\uff1a\u8fd9\u91cc\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528HTML\u683c\u5f0f\u3002</p>",
                        "class_source": 0,
                        "class_author": "\u5f20\u4e09",
                        "state": {
                            "overt": true,
                            "views": 81,
                            "likes": 304,
                            "comment": 603,
                            "is_delete": 0
                        },
                        "time": {
                            "create_time": "2024-06-21T15:49:09.923651Z",
                            "update_time": "2024-06-21T15:49:09.923651Z"
                        }
                    }
                ],
                errorMsg: true,
                timestamp: new Date()
            }
        },
    }
]

export default std